<?php
use yii\helpers\Html;
use common\components\helpers\Fun;
$opts = \yii\helpers\Json::htmlEncode([
    'items' => $model->getItems()
]);
$this->registerJs("var _opts = {$opts};");
$this->registerJs($this->render('_script.js'));
$animateIcon = ' <i class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></i>';

?>
<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height">
    <!--/*添加按钮*/-->
    <div class="docs-main zx-mg">
        <?= $this->renderFile('@app/views/layouts/toolbar.php'); ?>
    <div class="assignment-index">
        <div class="row">
            <div class="col-sm-5">
                <h2 style="padding-top: 5px;
                padding-bottom: 10px;
                padding-left: 10px;
                font-size: 1.6rem;
                color: #82888c;">待分配</h2>
                <input class="form-control search" data-target="available"
                       placeholder="<?=\Yii::t('zhtfrontend', 'Search for available');?>">
                <select multiple size="20" class="form-control list" data-target="available">
                </select>
            </div>
            <div class="col-sm-1">
                <br><br><br><br><br><br>
                <?=Html::a('<i class="glyphicon glyphicon-assign">&gt;&gt;</i>' . $animateIcon, Fun::url(['admin/assign','id'=>(string) $model->id]), [
                    'class' => 'btn btn-success btn-assign',
                    'data-target' => 'available',
                    'title' => \Yii::t('zhtfrontend', 'Assign'),
                ]);?><br><br>
                <?=Html::a('<i class="glyphicon glyphicon-assign">&lt;&lt;</i>' . $animateIcon, Fun::url(['admin/revoke','id'=>(string) $model->id]), [
                    'class' => 'btn btn-danger btn-assign',
                    'data-target' => 'assigned',
                    'title' => \Yii::t('zhtfrontend', 'Remove'),
                ]);?>
            </div>
            <div class="col-sm-5">
                <h2 style="padding-top: 5px;
                    padding-bottom: 10px;
                    padding-left: 10px;
                    font-size: 1.6rem;
                    color: #82888c;">已分配</h2>
                <input class="form-control search" data-target="assigned"
                       placeholder="<?=\Yii::t('zhtfrontend', 'Search for assigned');?>">
                <select multiple size="20" class="form-control list" data-target="assigned">
                </select>
            </div>
        </div>
    </div>
    </div>
</div>